package abaco.symbol.operation.boundered;

import abaco.symbol.operation.Boundered;

public class Integral extends Boundered {
	public static final String VARIABLE = "operation-boundered-integral-variable";

	public Integral() {
		latexOperator = "\\int";
	}

	@Override
	public String toLatex() {
		StringBuilder latex = new StringBuilder();
		latex.append(super.toLatex());
		String variable = toLatex(VARIABLE);
		if (!variable.equals(UNDEFINED_LATEX)) {
			// insert variable before right bracket
			latex.insert(latex.length() - 1, variable);
		}
		return latex.toString();
	}
}
